package com.dd.stack.jvm.stack;

import lombok.Getter;

/**
 * @Author liuxianmeng
 * @CreateTime 2025/9/2 9:17
 * @Description 类功能作用说明
 */
public class StackDemo01 implements I1, I2 {

    private static final int constant1 = 12;
    private static final String constant2 = "constant2";
    @Getter
    private static String variable1 = "variable1";
    @Getter
    private String variable2 = "variable1";

    public static void main(String[] args) {
        StackDemo01 stackDemo01 = new StackDemo01();
        int anInt = stackDemo01.getInt();
        Student stu = new Student();
        System.out.println(stu);
        System.out.println(anInt);
        System.out.println(constant1);
        System.out.println(constant2);
        System.out.println(variable1);
        System.out.println(stackDemo01.getVariable2());
        new Runnable() {
            public void run() {
                try {
                    Thread.sleep(1000000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        }.run();
    }

    public static void setVariable1(String variable1) {
        StackDemo01.variable1 = variable1;
    }

    private int getInt() {
        return 100;
    }
}

class Student {

}

interface I1 {

}

interface I2 {

}
